{include file="public/header" /}</head>
<body class="layui-anim">
<div class="x-nav layui-row">
	<span class="layui-breadcrumb layui-col-md9 layui-col-sm9">
		<!-- <a href="javascript:;">首页</a>
		{if $_page_navi.0}<a href="javascript:;">{$_page_navi.0.NavName}</a>{/if} -->
		<!-- {if $_page_navi.1} -->
		<a><cite>{$_page_navi.1.title}</cite></a>
	</span>
	<a class="layui-btn layui-btn-small" style="float:right" href="javascript:location.replace(location.href);" title="刷新"><i class="layui-icon">&#xe9aa;</i></a>
</div>
<div class="x-body">

	<xblock>
		<!--<button class="layui-btn layui-btn-danger stateAll" data-value="true" data-confirm="确认要删除吗？" url="{:URL(request()->controller().'/state',['key'=>'is_del'])}"><i class="layui-icon"></i>批量删除</button>-->
		<button class="layui-btn" onclick="show('添加','{:URL(request()->controller().'/add')}',1024,650)"><i class="layui-icon">&#xe61f;</i>添加</button>
		<span class="x-right" style="line-height:40px">共有数据：{$list->total()} 条</span>
	</xblock>
	<table class="layui-table layui-form">
		<thead>
		<tr>
			<th width="15"><input type="checkbox" lay-filter="list_all" lay-skin="primary"/></th>
			<th>名称</th>
			<th>标题</th>
			<th>类型</th>
			<th>分组</th>
			<th>创建时间</th>
			<th>更新时间</th>
			<th>状态</th>
			<th>操作</th>
		</tr>
		</thead>
		<tbody>

		{foreach name="list" id="vo"}
		<tr class="data_line" data_id="{$v.id}">
			<td><input type="checkbox" lay-filter="list_checkbox" lay-skin="primary" value="{$v.id}"/></td>
			<td>{$vo.name}</td>
			<td>{$vo.title}</td>
			<td>{$vo.type|get_config_type}</td>
			<td>{$vo.group|get_config_group}</td>
			<td>{$vo.create_time|date='Y-m-d H:i:s',###}</td>
			<td>{$vo.update_time|date='Y-m-d H:i:s',###}</td>
			<td class="td-status" style="text-align: center;">
				<input type="checkbox" lay-text="显示|隐藏" {if $vo.status=='1'}checked{/if} lay-skin="switch" lay-filter="switch" url="{:URL(request()->controller().'/state',['key'=>'status','id'=>$vo.id])}"/>
			</td>
			<td class="td-manage">
				<div class="layui-btn-group">
					<a class="layui-btn layui-btn-sm" onclick="show('编辑','{:URL(request()->controller().'/add',['id'=>$vo.id])}',1024,900)" href="javascript:;">编辑</a>
                	<a class="layui-btn layui-btn-sm layui-btn-danger state" data-id="{$vo.id}" data-value="true" data-confirm="确认要删除吗？" url="{:URL(request()->controller().'/state',['key'=>'is_del'])}">删除</a>
				</div>
			</td>
		</tr>
		{/foreach}
		</tbody>
	</table>
	<div class="page"><div>{$list->render()}</div></div>
</div>
</body>
</html>